#pragma once

#include "BaseInc.h"

class CWindowBuffer : public CBufferBase
{
public:
	CWindowBuffer();
	~CWindowBuffer();

public: // IBuffer
	byte_t * GetBuffer() const;
	int_32 GetStrike() const;
	int_32 GetWidth() const;
	int_32 GetPitch() const;
	int_32 GetHeight() const;

public:
	HBITMAP GetHBitmap() const;
	bool NeedResize(int_32 iWidth, int_32 iHeight) const;
	void Resize(HDC hdc, int_32 iWidth, int_32 iHeight);

private:
	void VerifyData() const;
public:
	HBITMAP m_hBmp;
	byte_t * m_pBuffer;
	int_32 m_iStrike;
	int_32 m_iWidth;
	int_32 m_iPitch;
	int_32 m_iHeight;
};
